<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.11.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>cppMISC: wheels::rb类 参考</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="../../clipboard.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../cookie.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript" src="../../darkmode_toggle.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">cppMISC<span id="projectnumber">&#160;v1.1</span>
   </div>
   <div id="projectbrief">cppMisc 文档系统</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.11.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(1); });
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('../../',true,false,'search.php','搜索',false);
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="../../df/d8d/namespacewheels.html">wheels</a></li><li class="navelem"><a class="el" href="../../d1/db2/classwheels_1_1rb.html">rb</a></li>  </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-types">Public 类型</a> &#124;
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="../../d2/d27/classwheels_1_1rb-members.html">所有成员列表</a>  </div>
  <div class="headertitle"><div class="title">wheels::rb类 参考</div></div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="../../d4/da3/ringbuff_8hpp_source.html">ringbuff.hpp</a>&gt;</code></p>
<div class="dynheader">
wheels::rb 的协作图:</div>
<div class="dyncontent">
<div class="center"><img src="../../db/d6f/classwheels_1_1rb__coll__graph.png" border="0" usemap="#awheels_1_1rb_coll__map" alt="Collaboration graph"/></div>
<map name="awheels_1_1rb_coll__map" id="awheels_1_1rb_coll__map">
<area shape="rect" title=" " alt="" coords="5,5,177,491"/>
</map>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public 类型</h2></td></tr>
<tr class="memitem:a43fba1cafe0f21ade8ab93f284b84843" id="r_a43fba1cafe0f21ade8ab93f284b84843"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a43fba1cafe0f21ade8ab93f284b84843">emErrCode</a> { <br />
&#160;&#160;<a class="el" href="#a43fba1cafe0f21ade8ab93f284b84843adc8ce530ea6f636cb03be0af6e84ee0f">ERR_ALLOC_MEM</a> = -1000
, <a class="el" href="#a43fba1cafe0f21ade8ab93f284b84843afa8ccc353b6a72a3d743595ec776f79f">ERR_NO_DATA</a>
, <a class="el" href="#a43fba1cafe0f21ade8ab93f284b84843a51a99a9395005f3084178be32a24b893">ERR_LESS_DATA</a>
, <a class="el" href="#a43fba1cafe0f21ade8ab93f284b84843a0cd4ca2524a21da78c7095c1f242301b">ERR_PTHREAD_MUTEX_INIT</a>
, <br />
&#160;&#160;<a class="el" href="#a43fba1cafe0f21ade8ab93f284b84843ae630e5dacb5a8a2a7782d76bef75f22d">ERR_SRC_NULL</a>
, <a class="el" href="#a43fba1cafe0f21ade8ab93f284b84843a2db6f5505fc8991cba50fbf467c6c259">ERR_DST_NULL</a>
, <a class="el" href="#a43fba1cafe0f21ade8ab93f284b84843a414561fba8539eecbfbfcb084c9405fe">ERR_DATA_NULL</a>
, <a class="el" href="#a43fba1cafe0f21ade8ab93f284b84843a82381052d9de2b8ec043ad7819eb57f0">ERR_IDX_CAN_NOT_FIND</a>
, <br />
&#160;&#160;<a class="el" href="#a43fba1cafe0f21ade8ab93f284b84843a89282d20ebf440f2a96ec63325566999">OK</a> = 0
<br />
 }</td></tr>
<tr class="separator:a43fba1cafe0f21ade8ab93f284b84843"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:abd5c03132a045aacc6ee8ef8ebc75491" id="r_abd5c03132a045aacc6ee8ef8ebc75491"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#abd5c03132a045aacc6ee8ef8ebc75491">rb</a> (size_t size=65536, bool autoZero=true)</td></tr>
<tr class="memdesc:abd5c03132a045aacc6ee8ef8ebc75491"><td class="mdescLeft">&#160;</td><td class="mdescRight">构造对象，在默认的情况下构造一个64K BYTE的缓冲区，并且将缓冲区全部清除为0  <br /></td></tr>
<tr class="separator:abd5c03132a045aacc6ee8ef8ebc75491"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4c5419a63fd69b606f0df507d49e554a" id="r_a4c5419a63fd69b606f0df507d49e554a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a4c5419a63fd69b606f0df507d49e554a">rb</a> (const <a class="el" href="../../d1/db2/classwheels_1_1rb.html">rb</a> &amp;b)</td></tr>
<tr class="separator:a4c5419a63fd69b606f0df507d49e554a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aecb50e4991fcfd79900e0ec2a03f0aa9" id="r_aecb50e4991fcfd79900e0ec2a03f0aa9"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aecb50e4991fcfd79900e0ec2a03f0aa9">~rb</a> ()</td></tr>
<tr class="separator:aecb50e4991fcfd79900e0ec2a03f0aa9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a52eaddee8ef54c672443f211eada463c" id="r_a52eaddee8ef54c672443f211eada463c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d1/db2/classwheels_1_1rb.html">rb</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a52eaddee8ef54c672443f211eada463c">operator=</a> (const <a class="el" href="../../d1/db2/classwheels_1_1rb.html">rb</a> &amp;b)</td></tr>
<tr class="separator:a52eaddee8ef54c672443f211eada463c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a91a3740b9c0aed89cb704cccb84269d9" id="r_a91a3740b9c0aed89cb704cccb84269d9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="#a43fba1cafe0f21ade8ab93f284b84843">emErrCode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a91a3740b9c0aed89cb704cccb84269d9">append</a> (const void *data, size_t size)</td></tr>
<tr class="separator:a91a3740b9c0aed89cb704cccb84269d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab572d952c783d952a2b0756131ce931b" id="r_ab572d952c783d952a2b0756131ce931b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="#a43fba1cafe0f21ade8ab93f284b84843">emErrCode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ab572d952c783d952a2b0756131ce931b">get</a> (void *data, size_t size)</td></tr>
<tr class="memdesc:ab572d952c783d952a2b0756131ce931b"><td class="mdescLeft">&#160;</td><td class="mdescRight">拷贝数据到给定内存。  <br /></td></tr>
<tr class="separator:ab572d952c783d952a2b0756131ce931b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af5bbd0d1d75ef73284516de6995b3520" id="r_af5bbd0d1d75ef73284516de6995b3520"><td class="memItemLeft" align="right" valign="top"><a class="el" href="#a43fba1cafe0f21ade8ab93f284b84843">emErrCode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#af5bbd0d1d75ef73284516de6995b3520">get</a> (void *data, size_t pos, size_t size)</td></tr>
<tr class="memdesc:af5bbd0d1d75ef73284516de6995b3520"><td class="mdescLeft">&#160;</td><td class="mdescRight">拷贝数据到给定内存。  <br /></td></tr>
<tr class="separator:af5bbd0d1d75ef73284516de6995b3520"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa68fc1b23adeccb9c5bd190b314f4eef" id="r_aa68fc1b23adeccb9c5bd190b314f4eef"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aa68fc1b23adeccb9c5bd190b314f4eef">clear</a> ()</td></tr>
<tr class="memdesc:aa68fc1b23adeccb9c5bd190b314f4eef"><td class="mdescLeft">&#160;</td><td class="mdescRight">清除内容。同时将其他参数都设置成默认的初始值  <br /></td></tr>
<tr class="separator:aa68fc1b23adeccb9c5bd190b314f4eef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a398f5ebc48098ec601d9814d9bf07b83" id="r_a398f5ebc48098ec601d9814d9bf07b83"><td class="memItemLeft" align="right" valign="top"><a class="el" href="#a43fba1cafe0f21ade8ab93f284b84843">emErrCode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a398f5ebc48098ec601d9814d9bf07b83">resize</a> (size_t size, bool autoZero=false)</td></tr>
<tr class="memdesc:a398f5ebc48098ec601d9814d9bf07b83"><td class="mdescLeft">&#160;</td><td class="mdescRight">重新分配内存大小。  <br /></td></tr>
<tr class="separator:a398f5ebc48098ec601d9814d9bf07b83"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0eeb8d036de2d8416bf96ba32d655326" id="r_a0eeb8d036de2d8416bf96ba32d655326"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a0eeb8d036de2d8416bf96ba32d655326">index</a> (const void *data, size_t len)</td></tr>
<tr class="memdesc:a0eeb8d036de2d8416bf96ba32d655326"><td class="mdescLeft">&#160;</td><td class="mdescRight">检索内容。这个函数检索出来的位置是相对于取数据起始位置的。  <br /></td></tr>
<tr class="separator:a0eeb8d036de2d8416bf96ba32d655326"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a66c13981c71441bf12d0c513971cdb3c" id="r_a66c13981c71441bf12d0c513971cdb3c"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a66c13981c71441bf12d0c513971cdb3c">length</a> ()</td></tr>
<tr class="memdesc:a66c13981c71441bf12d0c513971cdb3c"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取当前数据的长度  <br /></td></tr>
<tr class="separator:a66c13981c71441bf12d0c513971cdb3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5c4d9868c17ef09b28f56079b3ec3dd" id="r_aa5c4d9868c17ef09b28f56079b3ec3dd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aa5c4d9868c17ef09b28f56079b3ec3dd">drop</a> (size_t len)</td></tr>
<tr class="memdesc:aa5c4d9868c17ef09b28f56079b3ec3dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">放弃给定长度的数据  <br /></td></tr>
<tr class="separator:aa5c4d9868c17ef09b28f56079b3ec3dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-static-methods" name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:a2a51ec140e566e46855b8ec979d8c515" id="r_a2a51ec140e566e46855b8ec979d8c515"><td class="memItemLeft" align="right" valign="top">static std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a2a51ec140e566e46855b8ec979d8c515">errMsg</a> (<a class="el" href="#a43fba1cafe0f21ade8ab93f284b84843">emErrCode</a> e)</td></tr>
<tr class="separator:a2a51ec140e566e46855b8ec979d8c515"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock">
<p class="definition">在文件 <a class="el" href="../../d4/da3/ringbuff_8hpp_source.html">ringbuff.hpp</a> 第 <a class="el" href="../../d4/da3/ringbuff_8hpp_source.html#l00025">25</a> 行定义.</p>
</div><h2 class="groupheader">成员枚举类型说明</h2>
<a id="a43fba1cafe0f21ade8ab93f284b84843" name="a43fba1cafe0f21ade8ab93f284b84843"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a43fba1cafe0f21ade8ab93f284b84843">&#9670;&#160;</a></span>emErrCode</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="#a43fba1cafe0f21ade8ab93f284b84843">wheels::rb::emErrCode</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">枚举值</th></tr><tr><td class="fieldname"><a id="a43fba1cafe0f21ade8ab93f284b84843adc8ce530ea6f636cb03be0af6e84ee0f" name="a43fba1cafe0f21ade8ab93f284b84843adc8ce530ea6f636cb03be0af6e84ee0f"></a>ERR_ALLOC_MEM&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a43fba1cafe0f21ade8ab93f284b84843afa8ccc353b6a72a3d743595ec776f79f" name="a43fba1cafe0f21ade8ab93f284b84843afa8ccc353b6a72a3d743595ec776f79f"></a>ERR_NO_DATA&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a43fba1cafe0f21ade8ab93f284b84843a51a99a9395005f3084178be32a24b893" name="a43fba1cafe0f21ade8ab93f284b84843a51a99a9395005f3084178be32a24b893"></a>ERR_LESS_DATA&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a43fba1cafe0f21ade8ab93f284b84843a0cd4ca2524a21da78c7095c1f242301b" name="a43fba1cafe0f21ade8ab93f284b84843a0cd4ca2524a21da78c7095c1f242301b"></a>ERR_PTHREAD_MUTEX_INIT&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a43fba1cafe0f21ade8ab93f284b84843ae630e5dacb5a8a2a7782d76bef75f22d" name="a43fba1cafe0f21ade8ab93f284b84843ae630e5dacb5a8a2a7782d76bef75f22d"></a>ERR_SRC_NULL&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a43fba1cafe0f21ade8ab93f284b84843a2db6f5505fc8991cba50fbf467c6c259" name="a43fba1cafe0f21ade8ab93f284b84843a2db6f5505fc8991cba50fbf467c6c259"></a>ERR_DST_NULL&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a43fba1cafe0f21ade8ab93f284b84843a414561fba8539eecbfbfcb084c9405fe" name="a43fba1cafe0f21ade8ab93f284b84843a414561fba8539eecbfbfcb084c9405fe"></a>ERR_DATA_NULL&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a43fba1cafe0f21ade8ab93f284b84843a82381052d9de2b8ec043ad7819eb57f0" name="a43fba1cafe0f21ade8ab93f284b84843a82381052d9de2b8ec043ad7819eb57f0"></a>ERR_IDX_CAN_NOT_FIND&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a43fba1cafe0f21ade8ab93f284b84843a89282d20ebf440f2a96ec63325566999" name="a43fba1cafe0f21ade8ab93f284b84843a89282d20ebf440f2a96ec63325566999"></a>OK&#160;</td><td class="fielddoc"></td></tr>
</table>

<p class="definition">在文件 <a class="el" href="../../d4/da3/ringbuff_8hpp_source.html">ringbuff.hpp</a> 第 <a class="el" href="../../d4/da3/ringbuff_8hpp_source.html#l00028">28</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">构造及析构函数说明</h2>
<a id="abd5c03132a045aacc6ee8ef8ebc75491" name="abd5c03132a045aacc6ee8ef8ebc75491"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abd5c03132a045aacc6ee8ef8ebc75491">&#9670;&#160;</a></span>rb() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">rb::rb </td>
          <td>(</td>
          <td class="paramtype">size_t</td>          <td class="paramname"><span class="paramname"><em>size</em></span><span class="paramdefsep"> = </span><span class="paramdefval">65536</span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool</td>          <td class="paramname"><span class="paramname"><em>autoZero</em></span><span class="paramdefsep"> = </span><span class="paramdefval">true</span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>构造对象，在默认的情况下构造一个64K BYTE的缓冲区，并且将缓冲区全部清除为0 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">size[</td><td>I ], 要分配的内存大小 </td></tr>
    <tr><td class="paramname">autoZero[</td><td>I ], true初始化的时候讲内存设置为0，false不干涉原有的随机内容 </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>异常</dt><dd>
  <table class="exception">
    <tr><td class="paramname">如果内存分配失败跑出ERR_ALLOC_MEM</td><td></td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="../../de/daa/ringbuff_8cpp_source.html">ringbuff.cpp</a> 第 <a class="el" href="../../de/daa/ringbuff_8cpp_source.html#l00012">12</a> 行定义.</p>

</div>
</div>
<a id="a4c5419a63fd69b606f0df507d49e554a" name="a4c5419a63fd69b606f0df507d49e554a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4c5419a63fd69b606f0df507d49e554a">&#9670;&#160;</a></span>rb() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">rb::rb </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d1/db2/classwheels_1_1rb.html">rb</a> &amp;</td>          <td class="paramname"><span class="paramname"><em>b</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../de/daa/ringbuff_8cpp_source.html">ringbuff.cpp</a> 第 <a class="el" href="../../de/daa/ringbuff_8cpp_source.html#l00029">29</a> 行定义.</p>

</div>
</div>
<a id="aecb50e4991fcfd79900e0ec2a03f0aa9" name="aecb50e4991fcfd79900e0ec2a03f0aa9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aecb50e4991fcfd79900e0ec2a03f0aa9">&#9670;&#160;</a></span>~rb()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">rb::~rb </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../de/daa/ringbuff_8cpp_source.html">ringbuff.cpp</a> 第 <a class="el" href="../../de/daa/ringbuff_8cpp_source.html#l00052">52</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="a91a3740b9c0aed89cb704cccb84269d9" name="a91a3740b9c0aed89cb704cccb84269d9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a91a3740b9c0aed89cb704cccb84269d9">&#9670;&#160;</a></span>append()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="#a43fba1cafe0f21ade8ab93f284b84843">rb::emErrCode</a> rb::append </td>
          <td>(</td>
          <td class="paramtype">const void *</td>          <td class="paramname"><span class="paramname"><em>data</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t</td>          <td class="paramname"><span class="paramname"><em>size</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>添加数据 </p><dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">data[</td><td>I ], 要添加的数据 </td></tr>
    <tr><td class="paramname">size[</td><td>I ], 要附加的数据的长度 </td></tr>
    <tr><td class="paramname">成功操作返回__OK，</td><td>否则返回错误代码 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>注解</dt><dd>这里的操作可能会覆盖没有取出的数据</dd></dl>

<p class="definition">在文件 <a class="el" href="../../de/daa/ringbuff_8cpp_source.html">ringbuff.cpp</a> 第 <a class="el" href="../../de/daa/ringbuff_8cpp_source.html#l00080">80</a> 行定义.</p>

</div>
</div>
<a id="aa68fc1b23adeccb9c5bd190b314f4eef" name="aa68fc1b23adeccb9c5bd190b314f4eef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa68fc1b23adeccb9c5bd190b314f4eef">&#9670;&#160;</a></span>clear()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rb::clear </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>清除内容。同时将其他参数都设置成默认的初始值 </p>

<p class="definition">在文件 <a class="el" href="../../de/daa/ringbuff_8cpp_source.html">ringbuff.cpp</a> 第 <a class="el" href="../../de/daa/ringbuff_8cpp_source.html#l00211">211</a> 行定义.</p>

</div>
</div>
<a id="aa5c4d9868c17ef09b28f56079b3ec3dd" name="aa5c4d9868c17ef09b28f56079b3ec3dd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa5c4d9868c17ef09b28f56079b3ec3dd">&#9670;&#160;</a></span>drop()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rb::drop </td>
          <td>(</td>
          <td class="paramtype">size_t</td>          <td class="paramname"><span class="paramname"><em>len</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>放弃给定长度的数据 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">len[</td><td>I ], 要放弃的数据长度。如果要放弃的数据长度大于等于实际数据长度，则 这个操作和clear相同 </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="../../de/daa/ringbuff_8cpp_source.html">ringbuff.cpp</a> 第 <a class="el" href="../../de/daa/ringbuff_8cpp_source.html#l00198">198</a> 行定义.</p>

</div>
</div>
<a id="a2a51ec140e566e46855b8ec979d8c515" name="a2a51ec140e566e46855b8ec979d8c515"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2a51ec140e566e46855b8ec979d8c515">&#9670;&#160;</a></span>errMsg()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string rb::errMsg </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="#a43fba1cafe0f21ade8ab93f284b84843">emErrCode</a></td>          <td class="paramname"><span class="paramname"><em>e</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../de/daa/ringbuff_8cpp_source.html">ringbuff.cpp</a> 第 <a class="el" href="../../de/daa/ringbuff_8cpp_source.html#l00316">316</a> 行定义.</p>

</div>
</div>
<a id="af5bbd0d1d75ef73284516de6995b3520" name="af5bbd0d1d75ef73284516de6995b3520"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af5bbd0d1d75ef73284516de6995b3520">&#9670;&#160;</a></span>get() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="#a43fba1cafe0f21ade8ab93f284b84843">rb::emErrCode</a> rb::get </td>
          <td>(</td>
          <td class="paramtype">void *</td>          <td class="paramname"><span class="paramname"><em>data</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t</td>          <td class="paramname"><span class="paramname"><em>pos</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t</td>          <td class="paramname"><span class="paramname"><em>size</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>拷贝数据到给定内存。 </p>
<dl class="section note"><dt>注解</dt><dd>这个操作不会消耗数据，也就是不会到存取点的调整。 </dd></dl>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">data[</td><td>O ], 拷出内容保存指针 </td></tr>
    <tr><td class="paramname">pos[</td><td>I ], 拷贝偏移量 </td></tr>
    <tr><td class="paramname">size[</td><td>I ], 拷贝长度 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd></dd></dl>

<p class="definition">在文件 <a class="el" href="../../de/daa/ringbuff_8cpp_source.html">ringbuff.cpp</a> 第 <a class="el" href="../../de/daa/ringbuff_8cpp_source.html#l00146">146</a> 行定义.</p>

</div>
</div>
<a id="ab572d952c783d952a2b0756131ce931b" name="ab572d952c783d952a2b0756131ce931b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab572d952c783d952a2b0756131ce931b">&#9670;&#160;</a></span>get() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="#a43fba1cafe0f21ade8ab93f284b84843">rb::emErrCode</a> rb::get </td>
          <td>(</td>
          <td class="paramtype">void *</td>          <td class="paramname"><span class="paramname"><em>data</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t</td>          <td class="paramname"><span class="paramname"><em>size</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>拷贝数据到给定内存。 </p>
<dl class="section note"><dt>注解</dt><dd>这个操作会消耗掉内存中的数据， 也就是会导致存取点和数据长度的调整 </dd></dl>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">data[</td><td>O ], 拷出内容保存指针 </td></tr>
    <tr><td class="paramname">size[</td><td>I ], 拷贝长度 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功操作返回__OK， 否则返回错误代码 </dd></dl>

<p class="definition">在文件 <a class="el" href="../../de/daa/ringbuff_8cpp_source.html">ringbuff.cpp</a> 第 <a class="el" href="../../de/daa/ringbuff_8cpp_source.html#l00116">116</a> 行定义.</p>

</div>
</div>
<a id="a0eeb8d036de2d8416bf96ba32d655326" name="a0eeb8d036de2d8416bf96ba32d655326"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0eeb8d036de2d8416bf96ba32d655326">&#9670;&#160;</a></span>index()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t rb::index </td>
          <td>(</td>
          <td class="paramtype">const void *</td>          <td class="paramname"><span class="paramname"><em>data</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t</td>          <td class="paramname"><span class="paramname"><em>len</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>检索内容。这个函数检索出来的位置是相对于取数据起始位置的。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">data[</td><td>I ], 要检索的内容 </td></tr>
    <tr><td class="paramname">len[</td><td>I ], 检索内容长度 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功操作返回位置偏移量 @exceptions 如果操作错误或者找不到数据则抛出相对应的emErrCode数据 </dd></dl>

<p class="definition">在文件 <a class="el" href="../../de/daa/ringbuff_8cpp_source.html">ringbuff.cpp</a> 第 <a class="el" href="../../de/daa/ringbuff_8cpp_source.html#l00244">244</a> 行定义.</p>

</div>
</div>
<a id="a66c13981c71441bf12d0c513971cdb3c" name="a66c13981c71441bf12d0c513971cdb3c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a66c13981c71441bf12d0c513971cdb3c">&#9670;&#160;</a></span>length()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t rb::length </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取当前数据的长度 </p>
<dl class="section return"><dt>返回</dt><dd>返回数据的实际长度 </dd></dl>

<p class="definition">在文件 <a class="el" href="../../de/daa/ringbuff_8cpp_source.html">ringbuff.cpp</a> 第 <a class="el" href="../../de/daa/ringbuff_8cpp_source.html#l00189">189</a> 行定义.</p>

</div>
</div>
<a id="a52eaddee8ef54c672443f211eada463c" name="a52eaddee8ef54c672443f211eada463c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a52eaddee8ef54c672443f211eada463c">&#9670;&#160;</a></span>operator=()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d1/db2/classwheels_1_1rb.html">rb</a> &amp; rb::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d1/db2/classwheels_1_1rb.html">rb</a> &amp;</td>          <td class="paramname"><span class="paramname"><em>b</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../de/daa/ringbuff_8cpp_source.html">ringbuff.cpp</a> 第 <a class="el" href="../../de/daa/ringbuff_8cpp_source.html#l00058">58</a> 行定义.</p>

</div>
</div>
<a id="a398f5ebc48098ec601d9814d9bf07b83" name="a398f5ebc48098ec601d9814d9bf07b83"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a398f5ebc48098ec601d9814d9bf07b83">&#9670;&#160;</a></span>resize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="#a43fba1cafe0f21ade8ab93f284b84843">rb::emErrCode</a> rb::resize </td>
          <td>(</td>
          <td class="paramtype">size_t</td>          <td class="paramname"><span class="paramname"><em>size</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool</td>          <td class="paramname"><span class="paramname"><em>autoZero</em></span><span class="paramdefsep"> = </span><span class="paramdefval">false</span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>重新分配内存大小。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">size[</td><td>I ], 请求内存大小 </td></tr>
    <tr><td class="paramname">autoZero[</td><td>I ], 内容是否清除，true清除内容 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功操作返回__OK, 如果内存分配失败返回ERR_ALLOC_MEM </dd></dl>

<p class="definition">在文件 <a class="el" href="../../de/daa/ringbuff_8cpp_source.html">ringbuff.cpp</a> 第 <a class="el" href="../../de/daa/ringbuff_8cpp_source.html#l00223">223</a> 行定义.</p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>include/<a class="el" href="../../d4/da3/ringbuff_8hpp_source.html">ringbuff.hpp</a></li>
<li>src/<a class="el" href="../../de/daa/ringbuff_8cpp_source.html">ringbuff.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
